﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDB.LinqModel.Data;

namespace CDB.LinqModel
{
    public partial class NewsLetter
    {
        private IDataRepository _dataObject;

        public NewsLetter(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateNewsLetter(this);
        }
        public void Delete()
        {
            _dataObject.DeleteNewsLetter(this);
        }
        public void UpdateById()
        {
            _dataObject.UpdateNewsLetterById(this);
        }
        public List<NewsLetter> GetAllNewsLetter()
        {
            return _dataObject.GetAllNewsLetter();
        }
        public void GetNewsLetterById()
        {
            _dataObject.GetNewsLetterById(this);
        }
        public void GetNewsLetterByTitle()
        {
            _dataObject.GetNewsLetterByTitle(this);
        }
    }
}
